Dashboard.addWidget({ getId : function(){ return 'image-map-widget'; }, getName : function(){ return 'Image Map'; }, getDescription : function(){ return { en : 'Widget that display a set of KPIs or Goals over an image', de : 'Widget that display a set of KPIs or Goals over an image' }; }, getIconClass : function(){ return 'glyphicon glyphicon-picture'; }, createContent : function(configuration, currentWidgetInstanceId){ var _createCircleCode = function(color){ return''; } var _formatGoalStatusAsTrafficLightCode = function(status){ if(status == null) return _createCircleCode('lightgrey')+' '+_createCircleCode('lightgrey')+' '+_createCircleCode('lightgrey'); return _createCircleCode(status>0?'green ':'lightgrey')+' '+_createCircleCode(status==0?'grey ':'lightgrey')+' '+_createCircleCode(status<0?'red ':'lightgrey'); } var _formatKpiValue = function(value, measureUnit){ if(value == null) value = '--'; return '
'+objInfo.description+'
'; if(objInfo == null) return html; if(errorMsg != null){ html += 'Error Occurred: '+errorMsg+'
'; return html; } if(measure==null) throw 'Unexpected Exception!'; html += ''+item+' | '; }); html += '
---|
' + (dataItem[columnName]!=null?dataItem[columnName] + ' ' + objInfo.getFieldInfos(columnName).measureUnit :'') + ' | '; }); html += '
'+(i==0?'...':'')+' | '; }); html += '
More informations:
'; html += 'type | '+objInfo.type+' |
'+moreInfoKey+' | '+measure.moreInfo[moreInfoKey]+' |
No additional infos available |
'+moreInfoKey+' | '+measure.targetRangeAlgorithmResult.moreInfo[moreInfoKey]+' |
No additional infos available |
'+moreInfoKey+' | '+alertCurrentResult.moreInfo[moreInfoKey]+' |
No additional infos available |
'+objInfo.description+'
'; if(objInfo == null) return html; if(errorMsg != null){ html += 'Error Occurred: '+errorMsg+'
'; return html; } if(measure==null) throw 'Unexpected Exception!'; html += 'Details | Values |
---|---|
status | '+(measure.status==0?'UNKNOWN':(measure.status>0?'SUCCESS':'FAILURE'))+' |
type | '+objInfo.type+' |
'+moreInfoKey+' | '+measure.moreInfo[moreInfoKey]+' |
Click on the image to add KPIs/Goals
' ).append( $('').append( $(' |